#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Created by master on 2017/3/1
import os

from day5.dj.config import settings
# from day5.dj.config import settings as hah 起别名
# os.path.dir.name()

def db_auth(configs):
    if configs.DATABASE["user"] == "root" and configs.DATABASE["password"] == "123":
        print("db authentication passed!")
        return True
    else:
        print("db login error...")


def select(table, colum):
    if db_auth(settings):
        if table == "user":
            user_info = {
                "001": ['alex', 22, "engineer"],
                "002": ['longGe', 32, "chef"],
                "003": ['xiaoYun', 25, "baoan"],
            }
        return user_info
